<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.io.PrintWriter"%>
<%@ page import="java.util.*"%>
<%@ page import="javax.servlet.*"%>
<%@ page import="net.sf.json.*"%>
<%@page import="model.KhoiKienThucM"%>
<%@page import="dao.KhoiKienThucD"%>
<%
	JSONArray jsonarray = new JSONArray();
	KhoiKienThucD dao = new KhoiKienThucD();
	ArrayList<KhoiKienThucM> ls = dao.getAll();
	for (int i = 0; i < ls.size(); i++) {
		JSONObject obj = new JSONObject();
		obj.put("id", ls.get(i).getId_khoi_kien_thuc());
		obj.put("ten", ls.get(i).getTen());
		jsonarray.add(obj);
	}
	PrintWriter ou = response.getWriter();
	ou.println(jsonarray);
	ou.flush();
	ou.close();
%>